import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        // 购物车数量
        cart_length: 0,
    },
    mutations: {

        add_cart(state, data) {
            state.cart_length = data;
        },
        delete_cart(state){
            state.cart_length-=1
        }
    },
    actions: {},
    modules: {}
})
